package com.gxa.medical.service;

import com.gxa.medical.exception.BusinessException;
import com.gxa.medical.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserService {
    /**
     * 用户插入
     * @param user
     * @return
     * @throws BusinessException
     * @throws Exception
     */
    Integer insertUser(User user) throws  Exception;
    /***
     * 根据用户手机号查询id
     * @param phone
     * @return
     */
    List<User>  selectIdByPhone(String phone);

    /***
     * 用户登录
     * @param user
     * @return
     */
    List<User> loginUser(User user) throws  Exception;

    /***
     * 用户修改密码
     * @param user
     * @return
     */
    Integer updatePwd(User user) throws Exception;

    /**
     * 用户消息通知
     * @return
     * @throws Exception
     */
    Integer updateMessage(User user)throws Exception;
    /**
     * 修改用户个人信息
     * @param map
     * @return
     */
    Integer updateInformation(Map map) throws Exception;
    /**
     * 用户充值
     * @param money
     * @param phone
     * @return
     */
    Integer updateMany(Integer money, String phone) throws Exception;

    /**
     * 查询用户数据库的金额
     * @param phone
     * @return
     */
    User selectMany(String phone);
}
